package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.List;


/**
 * The persistent class for the EMPPASS database table.
 * 
 */
@Entity
@NamedQuery(name="Emppass.findAll", query="SELECT e FROM Emppass e")
public class Emppass implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="EMPPASS_PASSID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="EMPPASS_PASSID_GENERATOR")
	@Column(name="PASS_ID")
	private long passId;

	@Column(name="PASS_PWD")
	private String passPwd;

	//bi-directional many-to-one association to StaffInformation
	@ManyToOne
	@JoinColumn(name="STAIN_ID")
	@JSONField(serialize=false)
	private StaffInformation staffInformation;

	//bi-directional many-to-many association to Role
	
	@ManyToMany(mappedBy="emppasses")
	@JSONField(serialize=false)
	private List<Role> roles;

	public Emppass() {
	}

	public long getPassId() {
		return this.passId;
	}

	public void setPassId(long passId) {
		this.passId = passId;
	}

	public String getPassPwd() {
		return this.passPwd;
	}

	public void setPassPwd(String passPwd) {
		this.passPwd = passPwd;
	}

	public StaffInformation getStaffInformation() {
		return this.staffInformation;
	}

	public void setStaffInformation(StaffInformation staffInformation) {
		this.staffInformation = staffInformation;
	}

	public List<Role> getRoles() {
		return this.roles;
	}

	public void setRoles(List<Role> roles) {
		this.roles = roles;
	}

}